/**
 * 
 */
package com.leyu.search.utils;

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.impl.HttpSolrServer;

/**
 * @author change
 *
 */
public abstract class SolrHelper {
	private static String url;
	private static SolrServer solrServer;
	
	public static SolrServer getSolrServer(){
		if(solrServer==null){
			solrServer = new HttpSolrServer(url);
		}		
		return solrServer;
	}

	public static void setUrl(String url) {
		SolrHelper.url = url;
	}

}
